<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?php 
	$ci = & get_instance(); 
?>
<?php if(!isset($id)): ?>
<form action="<?php echo site_url('admin/dataman/match/event_category_submit');?>" name="event_category_submit" id="event_category_submit" method="post" enctype="multipart/form-data" >
	<input type="hidden" name="match_id" id="match_id" value="<?php echo $match_id;?>" />
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Category name:</span></div>
	<div class="grid6"><input type="text" maxlength="255" id="category" name="category" value="" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="category_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	
	<div class="grid2">&nbsp;</div>
	<div class="grid6"><input type="submit" class="button" /> <?php echo loader_image('id="loader_image" class="hidden"');?></div>
	<div class="clrboth"></div>	
	
</form>
<?php else:?>
<form action="<?php echo site_url('admin/dataman/match/event_category_submit');?>" name="event_category_submit" id="event_category_submit" method="post" enctype="multipart/form-data" >
	<input type="hidden" name="id" id="id" value="<?php echo $id;?>" />
	<?php $EVENT_CATEGORY = $ci->event_category_entity->init('id',$id);?>
	
	<div class="clrboth"></div>
	<div class="grid2"><span class="bold">*Category name:</span></div>
	<div class="grid6"><input type="text" maxlength="255" id="category" name="category" value="<?php echo $EVENT_CATEGORY->getCategory();?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="category_error">Required field.</span></div>
	<div class="clrboth"></div>
	
	
	<div class="grid2">&nbsp;</div>
	<div class="grid6"><input type="submit" class="button" /> <?php echo loader_image('id="loader_image" class="hidden"');?></div>
	<div class="clrboth"></div>	
	
</form>
<?php endif;?>